import request from '@/utils/request'

export default {
  getBannerListPage(current,size) {
    return request({
      url: `/admin/courses/pageBanner/${current}/${size}`,
      method: 'get',
    })
  },

  deleteBannerById(id) {
    return request({
      url: `/admin/courses/deleteBanner/${id}`,
      method: 'delete'
    })
  },

  save(banner) {
    return request({
      url: `/admin/courses/addBanner`,
      method: 'post',
      data: banner
    })
  },

  getById(id) {
    return request({
      url: `/admin/courses/getBannerById/${id}`,
      method: 'get'
    })
  },

  updateBanner(banner) {
    return request({
      url: `/admin/courses/updateBanner`,
      method: 'put',
      data: banner
    })
  }
}
